package com.example.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.domain.entity.PlantCategory;
import com.example.domain.entity.ProductCategory;
import com.example.exception.FloraException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface ProductCategoryService extends IService<ProductCategory> {
    IPage<ProductCategory> getProductCategoryPage(String name, Integer pageNum, Integer pageSize);

    List<ProductCategory> getProductCategoryList();

    @Transactional
    ProductCategory add(ProductCategory productCategory) throws FloraException;

    void updateCommon(ProductCategory productCategory) throws FloraException;

    void updateStatus(ProductCategory productCategory) throws FloraException;

    @Transactional
    void delete(Long id) throws FloraException;


}
